package com.example.rabbitmqtest01.listener;

import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Envelope;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component

public class FanoutListener {
    @RabbitListener(queues ={"fanout_queue_01","fanout_queue_02","fanout_queue_03"})
    public void listenerHandler(String msg){

        System.out.println("cunmser01 : "+msg);

    }
    @RabbitListener(queues ={"fanout_queue_01","fanout_queue_02","fanout_queue_03"})
    public void listenerHandler1(String msg){

        System.out.println("cunmser02 : "+msg);

    }
}



